package com.rran.study.designpattern.factory.builder;

/**
 * @author yy
 * @Type PersonBuilder.java
 * @Desc
 * @date 2020/7/23 14:58
 */
public class PersonBuilder {
    private Person person = new Person();

    public PersonBuilder buildHead() {
        person.setHead("头");
        return this;
    }

    public PersonBuilder buildBody() {
        person.setBody("身体");
        return this;
    }

    public PersonBuilder buildLeftHand() {
        person.setLeftHand("左手");
        return this;
    }

    public PersonBuilder buildRightHand() {
        person.setRightHand("右手");
        return this;
    }

    public PersonBuilder buildLeftLeg() {
        person.setLeftLeg("左腿");
        return this;
    }

    public PersonBuilder buildRightLeg() {
        person.setRightLeg("右腿");
        return this;
    }

    public Person getResult() {
        return this.person;
    }
}